#include <iostream>
#include <vector>
using namespace std;

vector<int> v1{1,2,3};
vector<int> v2(v1);
vector<int> v3(1,3);
vector<int>::iterator iter;

int main(int argc,char **argv)
{
    //cout<<v1.size()<<endl;
    v1.push_back(4);
    //cout<<v1.size()<<endl;
    v1.pop_back();

    //指向第一个元素的迭代器
    auto a=v1.begin();
    v1.insert(a,100);
    v1.erase(a);
    auto b=v1.end();//指向最后一个元素的迭代器

    cout<<*(a)<<endl;
    cout<<*(a+1)<<endl;

    for(auto &element:v1)
    {
        cout<<element<<" ";
    }
    cout<<endl;

    return 0;

}
